//
//  LockerVC.h
//  抽屉
//
//  Created by 李劲成 on 16/5/26.
//  Copyright © 2016年 ljc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UIViewController+Locker.h"

@protocol LocalVCDelegate;
@interface LockerVC : UIViewController<UIGestureRecognizerDelegate>
/** LocalVCDelegate 代理人 */
@property (weak, nonatomic) id<LocalVCDelegate> delegate;

/** 主界面控制器 */
@property (strong, readwrite, nonatomic) UIViewController *contentViewController;
/** 抽屉栏控制器 */
@property (strong, readwrite, nonatomic) UIViewController *leftMenuViewController;

/** 抽屉动画时间 */
@property (assign, readwrite, nonatomic) NSTimeInterval animationDuration;

/** 背景图片 */
@property (strong, readwrite, nonatomic) UIImage *backgroundImage;

/** 是否开启手势 */
@property (assign, readwrite, nonatomic) BOOL panGestureEnabled;
@property (assign, readwrite, nonatomic) BOOL panFromEdge;


@property (assign, readwrite, nonatomic) NSUInteger panMinimumOpenThreshold;
@property (assign, readwrite, nonatomic) IBInspectable BOOL interactivePopGestureRecognizerEnabled;


/** 背景图是否开启比例 */
@property (assign, readwrite, nonatomic) IBInspectable BOOL scaleBackgroundImageView;
/** 菜单视图是否开启比例 */
@property (assign, readwrite, nonatomic) IBInspectable BOOL scaleMenuView;
/** 菜单视图是否逐渐消失 */
@property (assign, readwrite, nonatomic) IBInspectable BOOL fadeMenuView;
/** 在显示菜单时是否设置内容视图比例 */
@property (assign, readwrite, nonatomic) IBInspectable BOOL scaleContentView;
/** 目录控制器界面比例 */
@property (assign, readwrite, nonatomic) CGAffineTransform menuViewControllerTransformation;
/** 在显示菜单时的内容视图比例 */
@property (assign, nonatomic) IBInspectable CGFloat contentViewScaleValue;
/** 在显示菜单时内容视图的透明度 */
@property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewFadeOutAlpha;
/** 在显示菜单时内容视图中心点的偏移值 x */

@property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewInLandscapeOffsetCenterX;
@property (assign, readwrite, nonatomic) IBInspectable CGFloat contentViewInPortraitOffsetCenterX;
/** 是否水平回弹 */
@property (assign, readwrite, nonatomic) IBInspectable BOOL bouncesHorizontally;

@property (assign, readwrite, nonatomic) UIStatusBarStyle menuPreferredStatusBarStyle;
@property (assign, readwrite, nonatomic) IBInspectable BOOL menuPrefersStatusBarHidden;

- (id)initWithContentViewController:(UIViewController *)contentViewController
             leftMenuViewController:(UIViewController *)leftMenuViewController;
- (void)presentLeftMenuViewController;
- (void)hideMenuViewController;
- (void)setContentViewController:(UIViewController *)contentViewController animated:(BOOL)animated;

@end


@protocol LocalVCDelegate <NSObject>
@optional
/** 将要显示菜单栏时 */
- (void)locker:(LockerVC *)locker willShowMenuViewController:(UIViewController *)menuViewController;
/** 已经显示菜单时 */
- (void)locker:(LockerVC *)locker  didShowMenuViewController:(UIViewController *)menuViewController;
/** 将要隐藏菜单时 */
- (void)locker:(LockerVC *)locker willHideMenuViewController:(UIViewController *)menuViewController;
/** 已经隐藏菜单 */
- (void)locker:(LockerVC *)locker didHideMenuViewController:(UIViewController *)menuViewController;
@end